package com.newly.center.business.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @anthor sbq
 * @date 2021/12/1 15:00
 */
@Configuration
public class WebSocketConfig {

    /**
     * 检测所有带有@serverEndpoint注解的bean并注册它们
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }
}
